<html>
    <head>
        <meta name='viewport' content='width=device-width; initial-scale=1; maximum-scale=1; minimum-scale=1; user-scalable=no;'>
        <title>工作台</title>
        <meta charset="utf-8" />

        <meta name="viewport"
              content="width=device-width,
    initial-scale=1.0,
    maximum-scale=1.0,
    user-scalable=0" />
        <style>
            *{
                margin:0;
                padding:0 ;
            }
            html,body{
                width:100%;height:100%;
            }
            body{
                /*background:url('/admin/img/bg.png');*/
            }
            #container{
                width:100%;height:100%;
                display:flex;
                align-items: center;
            }
            #container .panel{
                max-width:800px;
                height:400px;
                background:white;
                margin:-30px auto 0;
                border-radius:10px;
                box-shadow: 0 0 5px grey;
                display:flex;
                flex-wrap: wrap;
                justify-content: space-around;
                align-items: center;
                position: relative;
            }

            .item{
                max-width:80px;
                height:90px;
                background:white;
                border-radius:10px;
                padding:5px;
                border:1px solid #e2e2e2;
                cursor:pointer;
            }

            .item:hover{
                background:#efefef;
            }

            .panel-top{
                position: relative;
                background: #f2f2f2;
                width: 60px;
                height: 60px;
                margin: 0 auto;
                transform: rotate(45deg);
                z-index: 11;
                border: 1px solid #d8d8d8;
            }

        /*    移动端响应式   */
            @media screen and (max-width: 480px){
                #container .panel{
                    width:90%;
                    padding: 0px 20px;
                    height:400px;
                    background:white;
                    margin:-30px auto 0;
                    border-radius:10px;
                    box-shadow: 0 0 5px grey;
                    display:flex;
                    flex-wrap: wrap;
                    justify-content: space-around;
                    align-items: center;
                    position: relative;
                }

                .item{
                    max-width:120px;
                    height:90px;
                    background:white;
                    border-radius:10px;
                    padding:5px;
                    border:1px solid #e2e2e2;
                    cursor:pointer;
                }
            }
        </style>
    </head>
    <body>
        <div id="container">
            <div style="position: fixed;top:0px;left:0px;width:100%;height:60px;">
                <h2 style="width:100%;line-height:60px;text-align:center;">欢迎来到工作台</h2>
            </div>
            <div style="height:400px;width:100%;">
                <div class="panel-top"></div>
                <div class="panel" >
<!--                    <div onclick="addCheliangguanli()" class="item">-->
<!--                        <img src="images/clgl.png" style="width:100%;height:100%;" />-->
<!--                    </div>-->
<!--                    <div onclick="jiashizhengluru()" class="item">-->
<!--                        <img src="images/jszlr.png" style="width:100%;height:100%;" />-->
<!--                    </div>-->
                    <div id="daiban" style="height:102px;">
<!--                        <div onclick="zhizuotongxingzheng()" class="item">-->
<!--                            <img src="images/dytxz.png" style="width:100%;height:100%;" />-->
<!--                        </div>-->
                        <div id="dot" style='display:none;padding:0 4px;position: relative;top:-98px;right:5px;float:right;font-size:10px;height:15px;color:white;background:red;border-radius:20px;line-height:15px;text-align: center;'></div>
                    </div>
                    <div id="daiban2" style="height:102px;">
<!--                        <div onclick="banlitongzheng()" class="item">-->
<!--                            <img src="images/bltxz.png" style="width:100%;height:100%;" />-->
<!--                        </div>-->
                        <div id="dot2" style='display:none;padding:0 4px;position: relative;top:-98px;right:5px;float:right;font-size:10px;height:15px;color:white;background:red;border-radius:20px;line-height:15px;text-align: center;'></div>
                    </div>
                    <div id="daiban3" style="height:102px;">
<!--                        <div onclick="weizhangxiaofen()" class="item">-->
<!--                            <img src="images/wzxf.png" style="width:100%;height:100%;" />-->
<!--                        </div>-->
                        <div id="dot3" style='display:none;padding:0 4px;position: relative;top:-98px;right:5px;float:right;font-size:10px;height:15px;color:white;background:red;border-radius:20px;line-height:15px;text-align: center;'></div>
                    </div>

                    <div id="daiban4" style="height:102px;">
<!--                        <div onclick="weizhangshenhe()" class="item">-->
<!--                            <img src="images/wzsh.png" style="width:100%;height:100%;" />-->
<!--                        </div>-->
                        <div id="dot4" style='display:none;padding:0 4px;position: relative;top:-98px;right:5px;float:right;font-size:10px;height:15px;color:white;background:red;border-radius:20px;line-height:15px;text-align: center;'></div>
                    </div>

                    <div id="daiban5" style="height:102px;">
<!--                        <div onclick="nianjianshoufei()" class="item">-->
<!--                            <img src="images/njsf.png" style="width:100%;height:100%;" />-->
<!--                        </div>-->
                        <div id="dot5" style='display:none;padding:0 4px;position: relative;top:-98px;right:5px;float:right;font-size:10px;height:15px;color:white;background:red;border-radius:20px;line-height:15px;text-align: center;'></div>
                    </div>
                    <div id="daiban6" style="height:102px;">
<!--                        <div onclick="nianjianshenhe()" class="item">-->
<!--                            <img src="images/njsh.png" style="width:100%;height:100%;" />-->
<!--                        </div>-->
                        <div id="dot6" style='display:none;padding:0 4px;position: relative;top:-98px;right:5px;float:right;font-size:10px;height:15px;color:white;background:red;border-radius:20px;line-height:15px;text-align: center;'></div>
                    </div>
                </div>
            </div>
        </div>
    </body>
    <script src="/admin/js/jquery.min.js"></script>
    <script>
        var dot = $("#dot")
        var dot4 = $("#dot4")
        var dot6 = $("#dot6")

        // wzshCount();
        function wzshCount(){
            $.ajax({
                url:"/weizhang/selectWeizhangShenhe?status=0",
                success:function(res){
                    if(res.code==0){
                        if(res.count>0){
                            dot4.css("display" , "block")
                            dot4.html(res.count)
                        }
                    }
                }
            })
        }
        // setInterval(wzshCount , 3000);

        // njshCount();
        function njshCount(){
            $.ajax({
                url:"/nianjian/selectNianjian_shenhe?status=0",
                success:function(res){
                    if(res.code==0){
                        if(res.count>0){
                            dot6.css("display" , "block")
                            dot6.html(res.count)
                        }
                    }
                }
            })
        }
        // setInterval(njshCount , 3000);

        var arr = []
        $.ajax({
            url:"/status/per_status" ,
            async:false ,
            success:function(res) {
                if(res.code == 200) {
                    arr = res.data
                    for(var i in arr) {
                        arr[i] = arr[i] - 1
                    }
                }
            }
        })

        function jiashizhengluru(){
            location.href = "/admin/jiashi_zheng/jiashi_zheng_luru.html"
        }

        function addCheliangguanli(){
            location.href = "/admin/che_liang_guanli/che_liang.html"
        }

        function zhizuotongxingzheng(){
            location.href = "/admin/gongpai/zz_gongpai.html"
        }

        function banlitongzheng(){
            location.href = "/admin/gongpai/cheliang_kk.html"
        }

        function weizhangxiaofen(){
            location.href = "/admin/weizhang_chulu/wei_zhang_xiaofen.html"
        }

        function weizhangshenhe(){
            location.href = "/admin/weizhang_chulu/wei_zhang_shenhe.html"
        }

        function nianjianshoufei(){
            location.href = "/admin/nianjian/nianjian_shoufei.html"
        }
        function nianjianshenhe(){
            location.href = "/admin/nianjian/nianjian_shenghe.html?shenghe=2"
        }

    </script>
</html>